<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>事件绑定</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="div">
        <div>{{name}}</div>
        <!-- 事件名称=调用方法() -->
        <button v-on:click = "change()">改变div内容</button>
        <!-- 简写格式 -->
        <button @dblclick = "change()">简写格式，双击改变内容</button>

    </div>
</body>
<script>
    new Vue({
        el : "#div",
        data : {
            name : "事件绑定",
        },
        methods : {
             change(){
                 this.name = "事件绑定被调用了！"
             }
        }
    });
</script>
</html>